$(document).ready(function() {
	showClubActivities();
});
function showClubActivities() {
	$.ajax({
		url :localhost + "clubActivities/getClubActivities",
		dataType : "jsonp",
		jsonp : "jsonpCallback",
		success : function(data) {
			showMyClub(data);
		}
	});
}
function showMyClub(data) {
	var html = template('myClubArt', {
		data : data
	});
	$("#myMemorabilia").html(html);
}
function addClubA(caId) {
	var r = confirm("确认参加该活动");
	if (r == true) {
		$.ajax({
			url :localhost + "clubActivities/joinClubActivities",
			dataType : "jsonp",
			jsonp : "jsonpCallback",
			data : {
				clubActivitiesId : caId
			},
			success : function(data) {
				if (data <= 0) {
				alert("参加失败！");
					showClubActivities();
				} else {
					alert("参加成功！");
					window.location.href = "myActivities.shtml";
				}
			}
		});
	} else {
		alert("不参加算了！");
	}
}